import { baseRequest } from '@/utils/request'

const request = (url, ...arg) => baseRequest(`/supplier/base/stores/` + url, ...arg)

/**
 * 门店（仓库）信息Api接口管理器
 *
 * @author Mr.wu
 * @date  2025/03/15 18:35
 **/
export default {
	// 获取门店（仓库）信息分页
	supplierStoresPage(data) {
		return request('page', data, 'get')
	},
	// 提交门店（仓库）信息表单 edit为true时为编辑，默认为新增
	supplierStoresSubmitForm(data, edit = false) {
		return request(edit ? 'edit' : 'add', data)
	},
	// 删除门店（仓库）信息
	supplierStoresDelete(data) {
		return request('delete', data)
	},
	// 获取门店（仓库）信息详情
	supplierStoresDetail(data) {
		return request('detail', data, 'get')
	},
	supplierStoresList(){
		return request('storesList',null,'get')
	},
	supplierStoresTree(){
		return request('storesTree',null,'get')
	}
}
